#ifndef _DEFINE__
#define _DEFINE__

	void init_map();
	int * CreateTank();
	void drawblocks(int a[],int w,int h,int x,int y);
	void delete_cache();
	void Game_Run();
	void delete_blocks(int *a,int w,int h,int x,int y);
	BOOL textout(int x,int y, LPTSTR lpszString);
	HANDLE initiate();
	void clearScreen();
	bool isDirKey(int key);

	int map_posX = 2;
	int map_posY = 2; 
	const int KEY_UP = 72;
	const int KEY_DOWN = 80;
	const int KEY_LEFT = 75;
	const int KEY_RIGHT = 77;
	const int KEY_ESC = 27;
	const int KEY_S = 115;
	void load_Map();
	void draw_Map();
	int map_w,map_h;
	int *map = new int[map_w * map_h];

	const int typeTank = 0;
	const int typeBullt = 1;
	const int typeEnemy = 2;
	const int hidden = 1 << 1;
	int counter = 1;
	class cActor
	{
		public:
			cActor(int pos_x,int pos_y,int bulltDirection,int type)
			{
				this->pos_x = pos_x;
				this->pos_y = pos_y;
				this->type = type;
				this->bulltDirection = bulltDirection;
				flag = 1;
			}
			void draw();
			void delete_blocks(int,int);
			void move(int);
			void shot();
			bool canMove(int);
			void update();
			int getType();
			void addFlag(int);
			void removeFlag(int);
			bool haveFlag(int);
			void enemyMove(int);
		private:
			int pos_x;
			int pos_y;
			int type;
			int bulltDirection;
			int flag;

	};

	std::vector<cActor> cv;
#endif